from django.conf.urls import patterns, include, url
from django.conf.urls.static import static

from ssrobot import settings

#from django.contrib import admin
import DjangoUeditor
import xadmin
from xadmin.plugins import xversion

from ssrobot.views import socket
from msg_board.views import show_msg_board
from checkin.views import show_checkin
from runtime.users.views import useradd
from autoreply.views import get_article
#admin.autodiscover()

xadmin.autodiscover()
xversion.register_models()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'ssrobot.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(xadmin.site.urls)),
    url(r'^ueditor/', include('DjangoUeditor.urls')),
    url(r'^$', socket),
    url(r'^board/', show_msg_board),
    url(r'^checkin', show_checkin),
    url(r'^useradd/(.+)/$', useradd),
    url(r'^article/(\d+)/$', get_article)
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
